' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2024.09.09.00.00]) on 2024.10.05 at 16:34 (Coordinated Universal Time)
' Port by Charlie Veniot of ZXDunny's SpecBAS stereogram program (the second part)
' shared with the "BASIC Programming Language" Facebook group
' (https://www.facebook.com/share/v/zV2Btjk5uJRTwMXy/)
'
' Original code reformatted to make it easier for me to "see" the parts
SCREEN 27
COLOR , _RGB32( 200, 200, 200 )
10 s = _WIDTH / 800 : w = ( _WIDTH / 2 ) - ( s * 64 )
a = 0.1
ofs = -1
20 CLS
30 cx = _WIDTH / 4 : cy = _HEIGHT / 2
40 FOR i = 1 TO 2
50 FOR f = 1 TO 30 STEP 1
60 r = w / 2 / f
x = cx - w / 2 + r
y = cy
70 FOR g = 0 TO f - 1
80 xn = x + g * r * 2
an = a + g * 0.05
90 xn = cx + ( xn - cx ) * COS( an ) _
- ( y - cy ) * SIN( an )
100 yn = cy + ( xn - cx ) * SIN( an ) _
+ ( y - cy ) * COS( an )
110 CIRCLE( [ xn + ofs * f / 2 * s ], [ ymax - yn ] ), r, 0, , , , T
120 NEXT g
130 NEXT f
140 ofs *= -1 : cx += _WIDTH / 2
150 NEXT i
160 a += .01
170 SLEEP 0.001
180 GOTO 20